package com.chiry.shop.user.controller;

import com.chiry.common.vo.Result;
import com.chiry.common.bo.user.UserBO;
import com.chiry.shop.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fyx
 * @version 1.0
 * @date 2021/12/9 19:07
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("findUser/{id}")
    public Result<UserBO> findUserById(@PathVariable("id") Long id) {
        return userService.findOne(id);
    }
}
